/* 博客发布页面样式 */
.container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;
}

/* 顶部导航栏 */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20rpx;
  height: 90rpx;
  background-color: #ffffff;
  border-bottom: 1rpx solid #eeeeee;
}

.nav-item {
  font-size: 32rpx;
  color: #07c160;
  padding: 0 10rpx;
}

.nav-title {
  font-size: 36rpx;
  font-weight: 500;
  color: #333333;
}

/* 内容区域 */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 20rpx;
}

/* 表单项 */
.form-item {
  margin-bottom: 30rpx;
  background-color: #ffffff;
  border-radius: 16rpx;
  padding: 20rpx;
}

.form-label {
  font-size: 28rpx;
  color: #666666;
  margin-bottom: 16rpx;
}

/* 标题输入 */
.title-input {
  width: 100%;
  font-size: 36rpx;
  color: #333333;
  padding: 10rpx 0;
  border: none;
  outline: none;
}

.title-length {
  position: absolute;
  right: 0;
  bottom: 10rpx;
  font-size: 24rpx;
  color: #999;
}

.nav-item.disabled {
  color: #999;
  opacity: 0.5;
}

.action-btn.primary {
  background-color: #1aad19;
  color: white;
  margin-left: 20rpx;
}

/* 封面上传 */
.cover-uploader {
  position: relative;
}

.upload-btn {
  width: 100%;
  height: 220rpx;
  border: 2rpx dashed #dddddd;
  border-radius: 12rpx;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #fafafa;
}

.upload-btn image {
  width: 64rpx;
  height: 64rpx;
  margin-bottom: 16rpx;
}

.upload-btn text {
  font-size: 28rpx;
  color: #999999;
}

.cover-preview {
  width: 100%;
  height: 220rpx;
  position: relative;
  border-radius: 12rpx;
  overflow: hidden;
}

.cover-preview image {
  width: 100%;
  height: 100%;
  border-radius: 12rpx;
}

.delete-btn {
  position: absolute;
  top: 16rpx;
  right: 16rpx;
  width: 48rpx;
  height: 48rpx;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M18 6L6 18M6 6l12 12'%3E%3C/path%3E%3C/svg%3E");
  background-size: 24rpx 24rpx;
  background-repeat: no-repeat;
  background-position: center;
}

.upload-tip {
  display: block;
  font-size: 24rpx;
  color: #999999;
  margin-top: 12rpx;
}

/* 正文输入 */
.content-textarea {
  width: 100%;
  font-size: 32rpx;
  color: #333333;
  line-height: 1.6;
  border: none;
  outline: none;
  min-height: 300rpx;
}

/* 编辑器工具栏 */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  padding: 16rpx;
  background-color: #f5f5f5;
  border-radius: 8rpx 8rpx 0 0;
  border-bottom: 1rpx solid #eeeeee;
}

.tool-item {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64rpx;
  height: 64rpx;
  margin-right: 16rpx;
  background-color: #ffffff;
  border-radius: 8rpx;
  box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.05);
}

.tool-item:active {
  background-color: #eeeeee;
}

.tool-item text {
  font-size: 28rpx;
  color: #333333;
}

.tool-item image {
  width: 32rpx;
  height: 32rpx;
}

/* 编辑器内容区 */
.content-editor {
  width: 100%;
  min-height: 400rpx;
  font-size: 32rpx;
  line-height: 1.6;
  color: #333333;
  padding: 20rpx;
  box-sizing: border-box;
}

/* 图片上传 */
.image-uploader {
  display: flex;
  flex-wrap: wrap;
  gap: 20rpx;
  margin-top: 20rpx;
}

.image-uploader .upload-btn {
  width: 180rpx;
  height: 180rpx;
  flex-shrink: 0;
}

.image-preview {
  width: 180rpx;
  height: 180rpx;
  position: relative;
  border-radius: 12rpx;
  overflow: hidden;
}

.image-preview image {
  width: 100%;
  height: 100%;
}

.image-uploader .delete-btn {
  width: 40rpx;
  height: 40rpx;
  top: 8rpx;
  right: 8rpx;
  background-size: 20rpx 20rpx;
}

/* 文章标签 */
.tags-section {
  margin-bottom: 20px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-start;
}

.tag-item {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background-color: #f0f0f0;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
}

.tag-item text {
  margin-right: 8px;
}

.tag-delete {
  width: 18px;
  height: 18px;
  background-color: #ccc;
  border-radius: 50%;
  position: relative;
}

.tag-delete::before,
.tag-delete::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 1px;
  background-color: white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.tag-delete::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.tag-input {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 16px;
  min-width: 120px;
}

.tag-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333;
  background-color: transparent;
}

.add-tag-btn {
  padding: 4px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  color: #999;
  cursor: pointer;
  transition: all 0.3s;
}

.add-tag-btn:hover {
  border-color: #4CAF50;
  color: #4CAF50;
}

/* 标签弹窗样式 */
.tag-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.tag-dialog {
  width: 80%;
  max-width: 500px;
  background-color: white;
  border-radius: 12px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.tag-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.tag-dialog-title {
  font-size: 18px;
  font-weight: 500;
  color: #333;
}

.tag-dialog-close {
  width: 24px;
  height: 24px;
  position: relative;
}

.tag-dialog-close::before,
.tag-dialog-close::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 1px;
  background-color: #999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.tag-dialog-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.tag-dialog-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.tag-search-input {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  margin-bottom: 16px;
  box-sizing: border-box;
  height: auto;
  line-height: 20px;
}

.tag-category {
  margin-bottom: 20px;
}

/* 搜索结果样式 */
.search-results {
  margin-bottom: 20px;
}

.search-results-title {
  font-size: 14px;
  font-weight: 500;
  color: #999;
  margin-bottom: 10px;
  display: block;
}

.search-results-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-title {
  font-size: 14px;
  font-weight: 500;
  color: #999;
  margin-bottom: 10px;
  display: block;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-tag {
  padding: 6px 16px;
  background-color: #f5f5f5;
  border-radius: 16px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

.category-tag:hover {
  background-color: #e0e0e0;
}

.category-tag.tag-selected {
  background-color: #4CAF50;
  color: white;
  border-radius: 6px;
}

.tag-count {
  font-size: 12px;
  color: #999;
  display: block;
  text-align: center;
  margin-top: 10px;
}

/* 无搜索结果提示样式 */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
}

/* 摘要输入 */
.summary-textarea {
  width: 100%;
  font-size: 32rpx;
  color: #333333;
  line-height: 1.6;
  border: none;
  outline: none;
  min-height: 120rpx;
}

/* 单选框组 */
.radio-group {
  display: flex;
  gap: 40rpx;
  padding: 10rpx 0;
}

.radio-item {
  display: flex;
  align-items: center;
}

.radio-item-active {
  color: #07c160;
}

.radio-circle {
  width: 36rpx;
  height: 36rpx;
  border: 2rpx solid #cccccc;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 16rpx;
}

.radio-item-active .radio-circle {
  border-color: #07c160;
}

.radio-dot {
  width: 20rpx;
  height: 20rpx;
  background-color: #07c160;
  border-radius: 50%;
}

.radio-item text {
  font-size: 32rpx;
  color: #333333;
}

.radio-item-active text {
  color: #07c160;
}

/* 底部操作栏 */
.bottom-bar {
  display: flex;
  justify-content: space-around;
  padding: 20rpx;
  background-color: #ffffff;
  border-top: 1rpx solid #eeeeee;
}

.action-btn {
  width: 260rpx;
  height: 88rpx;
  background-color: #07c160;
  color: #ffffff;
  font-size: 32rpx;
  border-radius: 44rpx;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 弹窗样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  width: 600rpx;
  background-color: #ffffff;
  border-radius: 20rpx;
  padding: 30rpx;
}

.modal-title {
  font-size: 36rpx;
  font-weight: 500;
  color: #333333;
  text-align: center;
  margin-bottom: 30rpx;
}

.datetime-picker {
  margin-bottom: 30rpx;
}

.picker-item {
  height: 80rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  border-radius: 12rpx;
  font-size: 32rpx;
  color: #333333;
}

.modal-buttons {
  display: flex;
  gap: 20rpx;
}

.modal-btn {
  flex: 1;
  height: 80rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32rpx;
  color: #666666;
  border: 2rpx solid #eeeeee;
  border-radius: 12rpx;
}

.modal-btn-primary {
  background-color: #07c160;
  color: #ffffff;
  border-color: #07c160;
}